package com.atguigu.gulimall.order.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.order.to.WareSkuLockTo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("gulimall-ware")
public interface WareFeignService {
    @RequestMapping("/ware/waresku/hashStock")
    R hashStock(@RequestBody List<Long> skuIds);


    @GetMapping("/ware/wareinfo/getFare")
    R getFare(@RequestParam("addrId") Long addrId);


    //锁定库存
    //锁定库存
    @RequestMapping("/ware/waresku/lockStock")
    R lockStock(@RequestBody WareSkuLockTo wareSkuLockTo);

}
